-- https://helpdoc.touchsprite.com/dev_docs/12/48.html

function RxShowUI()
  local html = [[

  <!--< html code >-->

  ]]

  local thread = require('thread')
  local event = require('event')
  --创建 webview
  local showui_view,err = require('webview').new("myshowui",
      {html=html})
  assert(showui_view,err)
  event.register("showUI_commit",function(value)
    local ts = require("ts")--使用扩展库前必须插入这一句
    local json = ts.json--使用 JSON 模块前必须插入这一句
    local v = json.encode(value) or {}
    RxConfig.updateUrl = v.url or ''
    showui_view.close()
    dialog('value='..tostring(v), 10000)

      uiMain()
  end)

  event.register("showUI_cancel",function(value)
      showui_view.close()
  end)
  showui_view.show()
  thread.waitAllThreadExit()
end